A PW is a technology of simulating various point-to-point services on a packet switching network. Currently, a PW is established by adopting the label distribution protocol (LDP), and the PW needs to be carried on a label switching path (LSP) tunnel. Establishment of the LSP tunnel is independent of the establishment of the PW.
The following takes a process of establishing an LDP PW as an example. As shown in FIG. 1, provider edge 1 (PE1) and PE2 send a PW label request to each other to establish an LDP peer. To establish a PW from PE2 to PE1, PE1 sends a PW label mapping message a (LMa) to PE2. A forwarding equivalence class type length value (FEC TLV) carried in the message LMa may be a general PW ID FEC TLV (0x81) or a PW ID FEC TLV (0x80).
If the general PW ID FEC TLV is used, the message LMa carries at least an attachment group identifier (AGI), a source attachment individual identifier (SAID, and a target attachment individual identifier (TAII). In addition, the message LMa may further carry addresses of PE1 and PE2, interface parameters, a group ID, a transmission direct circuit, and a PE capability.
If the PW ID FEC TLV is used, the message LMa carries at least a PW ID. In addition, the message LMa may further carry addresses of PE1 and PE2, a transmission direct circuit, and a PE capability.
After receiving the message LMa, PE2 matches a corresponding local PW according to the AGI, SAII, TAII, or PW ID carried in the message LMa. In addition, PE2 takes the corresponding PW as a PW label at the PW multiplexing layer. In this case, a PW from PE2 to PET is established.
When PE2 does not successfully match a corresponding PW, PE2 sends a corresponding label release message to PE1 carrying a state code “Unassigned/Unrecognized TAI”, and the process ends.
After the PW from PE2 to PE1 is successfully established, if PE2 does not send a PW label mapping message b (LMb) to PE1 before receiving the message LMa, a PW from PE1 to PE2 needs to be established. The process of establishing a PW from PE1 to PE2 is similar to the preceding process of establishing a PW from PE2 to PE1.
If PE2 has sent a message LMb to PE1 before receiving the message LMa, a PW from PE1 to PE2 does not need to be established, and the process ends.
Therefore, during research, the inventor finds at least the following drawbacks in the prior art: There is no association between LSP tunnel selections performed by two PEs; therefore, a PW service with the high quality cannot be assured. For example, if the PW service is required to provide QoS assurance at a same level in two directions, the two PEs need to automatically select LSP tunnels with QoS assurance at a same level. The prior art cannot fulfill the process. For another example, if an MPLS TP PW service may be required to carry a PW on a bidirectional LSP tunnel. The PEs at two ends can independently select a bidirectional LSP tunnel. As a result, the two selected LSPs are different, and the preceding requirements cannot be met.